<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>薛之谦音乐平台 - 官方粉丝基地</title>
    <!-- 引入外部资源并添加超时处理 -->
    <script src="https://cdn.tailwindcss.com" onerror="alert('Tailwind CSS加载失败，请检查网络连接')"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet" onerror="alert('Font Awesome加载失败，请检查网络连接')">
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js" onerror="alert('Chart.js加载失败，请检查网络连接')"></script>

    <!-- 配置Tailwind -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#E63946', // 薛之谦常用的红色调
                        secondary: '#1D3557',
                        accent: '#457B9D',
                        light: '#F1FAEE',
                        dark: '#0D1B2A'
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif'],
                        display: ['Montserrat', 'sans-serif']
                    }
                }
            }
        }
    </script>

    <!-- 自定义工具类 -->
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .text-shadow-lg {
                text-shadow: 0 4px 8px rgba(0,0,0,0.25);
            }
            .backdrop-blur {
                backdrop-filter: blur(8px);
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .card-hover {
                transition: all 0.3s ease;
            }
            .card-hover:hover {
                transform: translateY(-5px);
            }
        }
    </style>

    <style>
        /* 全局样式 */
        body {
            scroll-behavior: smooth;
            background-color: #0D1B2A;
            opacity: 0;
            transition: opacity 0.5s ease-in-out;
        }

        /* 页面加载完成后显示 */
        body.loaded {
            opacity: 1;
        }

        /* 动画效果 */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .animate-fade-in {
            animation: fadeIn 0.6s ease forwards;
        }

        .delay-100 { animation-delay: 0.1s; }
        .delay-200 { animation-delay: 0.2s; }
        .delay-300 { animation-delay: 0.3s; }
        .delay-400 { animation-delay: 0.4s; }
        .delay-500 { animation-delay: 0.5s; }

        /* 音乐播放器进度条 */
        .progress-container {
            height: 4px;
            background: rgba(255,255,255,0.2);
            border-radius: 2px;
            cursor: pointer;
        }

        .progress-bar {
            height: 100%;
            background: #E63946;
            border-radius: 2px;
            width: 0%;
            transition: width 0.1s linear;
        }

        /* 视频播放按钮覆盖层 */
        .video-overlay {
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .video-card:hover .video-overlay {
            opacity: 1;
        }

        /* 导航栏滚动效果 */
        .nav-scrolled {
            background-color: rgba(13, 27, 42, 0.95);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        /* 加载指示器 */
        .loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #0D1B2A;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 0.5s ease;
        }

        .loader-spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(241, 250, 238, 0.2);
            border-top: 5px solid #E63946;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .loader.fade-out {
            opacity: 0;
            pointer-events: none;
        }

        /* 播放按钮动画 */
        .play-btn-playing i {
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
    </style>
</head>

<body class="font-sans text-light antialiased">
<!-- 加载指示器 -->
<div class="loader" id="loader">
    <div class="loader-spinner"></div>
</div>

<!-- 导航栏 -->
<header id="navbar" class="fixed w-full top-0 z-50 transition-all duration-300 py-4">
    <div class="container mx-auto px-4 md:px-6 flex items-center justify-between">
        <!-- Logo -->
        <a href="#" class="flex items-center space-x-2">
            <div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center">
                <span class="font-display font-bold text-xl">薛</span>
            </div>
            <span class="font-display font-bold text-xl md:text-2xl">薛之谦音乐平台</span>
        </a>

        <!-- 桌面导航 -->
        <nav class="hidden md:flex items-center space-x-8">
            <a href="#home" class="hover:text-primary transition-colors duration-200">首页</a>
            <a href="#songs" class="hover:text-primary transition-colors duration-200">歌曲</a>
            <a href="#videos" class="hover:text-primary transition-colors duration-200">MV</a>
            <a href="#about" class="hover:text-primary transition-colors duration-200">关于</a>
            <a href="#news" class="hover:text-primary transition-colors duration-200">动态</a>
        </nav>

        <!-- 搜索和用户按钮 -->
        <div class="flex items-center space-x-4">
            <button class="hover:text-primary transition-colors duration-200">
                <i class="fa fa-search text-xl"></i>
            </button>
            <button class="hover:text-primary transition-colors duration-200">
                <i class="fa fa-user-circle text-xl"></i>
            </button>

            <!-- 移动端菜单按钮 -->
            <button id="menu-toggle" class="md:hidden hover:text-primary transition-colors duration-200">
                <i class="fa fa-bars text-xl"></i>
            </button>
        </div>
    </div>

    <!-- 移动端导航菜单 -->
    <div id="mobile-menu" class="md:hidden hidden bg-dark/95 backdrop-blur absolute w-full mt-4 py-4 px-4 border-t border-gray-800">
        <nav class="flex flex-col space-y-4">
            <a href="#home" class="hover:text-primary transition-colors duration-200 py-2">首页</a>
            <a href="#songs" class="hover:text-primary transition-colors duration-200 py-2">歌曲</a>
            <a href="#videos" class="hover:text-primary transition-colors duration-200 py-2">MV</a>
            <a href="#about" class="hover:text-primary transition-colors duration-200 py-2">关于</a>
            <a href="#news" class="hover:text-primary transition-colors duration-200 py-2">动态</a>
        </nav>
    </div>
</header>

<!-- 英雄区域 -->
<section id="home" class="relative min-h-screen flex items-center justify-center overflow-hidden pt-16">
    <!-- 背景图片 -->
    <div class="absolute inset-0 z-0">
        <img src="https://picsum.photos/id/1076/1920/1080" alt="薛之谦舞台表演" class="w-full h-full object-cover opacity-50" loading="lazy">
        <div class="absolute inset-0 bg-gradient-to-b from-dark/70 via-dark/50 to-dark"></div>
    </div>

    <!-- 内容 -->
    <div class="container mx-auto px-4 md:px-6 z-10 text-center">
        <h1 class="font-display font-bold text-[clamp(2.5rem,8vw,5rem)] leading-tight text-shadow-lg mb-4 animate-fade-in">
            薛之谦
        </h1>
        <p class="text-[clamp(1rem,3vw,1.5rem)] max-w-3xl mx-auto mb-8 text-light/90 animate-fade-in delay-200">
            中国内地歌手、音乐制作人、演员
        </p>
        <div class="flex flex-col sm:flex-row justify-center gap-4 animate-fade-in delay-300">
            <a href="#songs" class="bg-primary hover:bg-primary/90 text-white font-medium py-3 px-8 rounded-full transition-all duration-300 transform hover:scale-105">
                播放热门歌曲
            </a>
            <a href="#about" class="bg-transparent border-2 border-light hover:border-primary hover:text-primary text-white font-medium py-3 px-8 rounded-full transition-all duration-300">
                了解更多
            </a>
        </div>
    </div>

    <!-- 向下滚动指示 -->
    <div class="absolute bottom-10 left-1/2 transform -translate-x-1/2 animate-bounce">
        <a href="#songs" class="text-light/70 hover:text-primary transition-colors">
            <i class="fa fa-chevron-down text-2xl"></i>
        </a>
    </div>
</section>

<!-- 热门歌曲区域 -->
<section id="songs" class="py-20 bg-dark">
    <div class="container mx-auto px-4 md:px-6">
        <div class="flex justify-between items-end mb-12">
            <div>
                <h2 class="font-display font-bold text-[clamp(1.5rem,3vw,2.5rem)] mb-2">热门歌曲</h2>
                <p class="text-light/70 max-w-2xl">薛之谦的经典作品和最新单曲，每一首歌都讲述着独特的故事</p>
            </div>
            <a href="#" class="hidden md:flex items-center text-primary hover:text-primary/80 transition-colors">
                查看全部 <i class="fa fa-arrow-right ml-2"></i>
            </a>
        </div>

        <!-- 歌曲列表 -->
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
            <!-- 歌曲1 -->
            <div class="bg-secondary/30 rounded-xl p-4 flex items-center space-x-4 card-hover">
                <div class="relative w-20 h-20 flex-shrink-0">
                    <img src="https://picsum.photos/id/1025/200/200" alt="《演员》专辑封面" class="w-full h-full object-cover rounded-lg" loading="lazy">
                    <button class="play-btn absolute inset-0 bg-primary/80 rounded-lg flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity" data-song="演员" data-duration="4:21" data-album="初学者" data-cover="https://picsum.photos/id/1025/200/200">
                        <i class="fa fa-play text-2xl"></i>
                    </button>
                </div>
                <div class="flex-grow">
                    <h3 class="font-bold text-lg">演员</h3>
                    <p class="text-light/70 text-sm">《初学者》</p>
                    <div class="flex items-center mt-2 space-x-3">
                        <span class="text-light/60 text-sm">4:21</span>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-heart-o"></i>
                        </button>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-plus"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 歌曲2 -->
            <div class="bg-secondary/30 rounded-xl p-4 flex items-center space-x-4 card-hover">
                <div class="relative w-20 h-20 flex-shrink-0">
                    <img src="https://picsum.photos/id/1074/200/200" alt="《丑八怪》专辑封面" class="w-full h-full object-cover rounded-lg" loading="lazy">
                    <button class="play-btn absolute inset-0 bg-primary/80 rounded-lg flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity" data-song="丑八怪" data-duration="4:13" data-album="意外" data-cover="https://picsum.photos/id/1074/200/200">
                        <i class="fa fa-play text-2xl"></i>
                    </button>
                </div>
                <div class="flex-grow">
                    <h3 class="font-bold text-lg">丑八怪</h3>
                    <p class="text-light/70 text-sm">《意外》</p>
                    <div class="flex items-center mt-2 space-x-3">
                        <span class="text-light/60 text-sm">4:13</span>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-heart-o"></i>
                        </button>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-plus"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 歌曲3 -->
            <div class="bg-secondary/30 rounded-xl p-4 flex items-center space-x-4 card-hover">
                <div class="relative w-20 h-20 flex-shrink-0">
                    <img src="https://picsum.photos/id/1083/200/200" alt="《认真的雪》专辑封面" class="w-full h-full object-cover rounded-lg" loading="lazy">
                    <button class="play-btn absolute inset-0 bg-primary/80 rounded-lg flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity" data-song="认真的雪" data-duration="4:19" data-album="薛之谦" data-cover="https://picsum.photos/id/1083/200/200">
                        <i class="fa fa-play text-2xl"></i>
                    </button>
                </div>
                <div class="flex-grow">
                    <h3 class="font-bold text-lg">认真的雪</h3>
                    <p class="text-light/70 text-sm">《薛之谦》</p>
                    <div class="flex items-center mt-2 space-x-3">
                        <span class="text-light/60 text-sm">4:19</span>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-heart-o"></i>
                        </button>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-plus"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 歌曲4 -->
            <div class="bg-secondary/30 rounded-xl p-4 flex items-center space-x-4 card-hover">
                <div class="relative w-20 h-20 flex-shrink-0">
                    <img src="https://picsum.photos/id/1062/200/200" alt="《刚刚好》专辑封面" class="w-full h-full object-cover rounded-lg" loading="lazy">
                    <button class="play-btn absolute inset-0 bg-primary/80 rounded-lg flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity" data-song="刚刚好" data-duration="3:58" data-album="初学者" data-cover="https://picsum.photos/id/1062/200/200">
                        <i class="fa fa-play text-2xl"></i>
                    </button>
                </div>
                <div class="flex-grow">
                    <h3 class="font-bold text-lg">刚刚好</h3>
                    <p class="text-light/70 text-sm">《初学者》</p>
                    <div class="flex items-center mt-2 space-x-3">
                        <span class="text-light/60 text-sm">3:58</span>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-heart-o"></i>
                        </button>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-plus"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 歌曲5 -->
            <div class="bg-secondary/30 rounded-xl p-4 flex items-center space-x-4 card-hover">
                <div class="relative w-20 h-20 flex-shrink-0">
                    <img src="https://picsum.photos/id/1059/200/200" alt="《暧昧》专辑封面" class="w-full h-full object-cover rounded-lg" loading="lazy">
                    <button class="play-btn absolute inset-0 bg-primary/80 rounded-lg flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity" data-song="暧昧" data-duration="4:18" data-album="渡" data-cover="https://picsum.photos/id/1059/200/200">
                        <i class="fa fa-play text-2xl"></i>
                    </button>
                </div>
                <div class="flex-grow">
                    <h3 class="font-bold text-lg">暧昧</h3>
                    <p class="text-light/70 text-sm">《渡》</p>
                    <div class="flex items-center mt-2 space-x-3">
                        <span class="text-light/60 text-sm">4:18</span>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-heart-o"></i>
                        </button>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-plus"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 歌曲6 -->
            <div class="bg-secondary/30 rounded-xl p-4 flex items-center space-x-4 card-hover">
                <div class="relative w-20 h-20 flex-shrink-0">
                    <img src="https://picsum.photos/id/1079/200/200" alt="《绅士》专辑封面" class="w-full h-full object-cover rounded-lg" loading="lazy">
                    <button class="play-btn absolute inset-0 bg-primary/80 rounded-lg flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity" data-song="绅士" data-duration="4:09" data-album="绅士" data-cover="https://picsum.photos/id/1079/200/200">
                        <i class="fa fa-play text-2xl"></i>
                    </button>
                </div>
                <div class="flex-grow">
                    <h3 class="font-bold text-lg">绅士</h3>
                    <p class="text-light/70 text-sm">《绅士》</p>
                    <div class="flex items-center mt-2 space-x-3">
                        <span class="text-light/60 text-sm">4:09</span>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-heart-o"></i>
                        </button>
                        <button class="text-light/60 hover:text-primary transition-colors">
                            <i class="fa fa-plus"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <!-- 移动端查看全部按钮 -->
        <div class="mt-8 text-center md:hidden">
            <a href="#" class="inline-flex items-center text-primary hover:text-primary/80 transition-colors">
                查看全部 <i class="fa fa-arrow-right ml-2"></i>
            </a>
        </div>
    </div>
</section>

<!-- 排行榜区域 -->
<section class="py-16 bg-gradient-to-b from-dark to-secondary/20">
    <div class="container mx-auto px-4 md:px-6">
        <div class="mb-12">
            <h2 class="font-display font-bold text-[clamp(1.5rem,3vw,2.5rem)] mb-2">人气排行榜</h2>
            <p class="text-light/70 max-w-2xl">薛之谦歌曲的实时人气排名，根据播放量和粉丝互动数据更新</p>
        </div>

        <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
            <!-- 排名列表 -->
            <div class="lg:col-span-2 bg-secondary/30 rounded-xl p-6">
                <div class="space-y-4">
                    <!-- 排名1 -->
                    <div class="flex items-center p-3 bg-dark/40 rounded-lg">
                        <div class="w-8 h-8 bg-primary rounded-full flex items-center justify-center font-bold mr-4">1</div>
                        <img src="https://picsum.photos/id/1025/60/60" alt="《演员》专辑封面" class="w-12 h-12 object-cover rounded mr-4" loading="lazy">
                        <div class="flex-grow">
                            <h4 class="font-medium">演员</h4>
                            <p class="text-light/60 text-sm">播放量: 123,456,789</p>
                        </div>
                        <button class="play-btn text-primary hover:bg-primary hover:text-white w-8 h-8 rounded-full flex items-center justify-center transition-colors" data-song="演员" data-duration="4:21" data-album="初学者" data-cover="https://picsum.photos/id/1025/200/200">
                            <i class="fa fa-play"></i>
                        </button>
                    </div>

                    <!-- 排名2 -->
                    <div class="flex items-center p-3 bg-dark/40 rounded-lg">
                        <div class="w-8 h-8 bg-primary/80 rounded-full flex items-center justify-center font-bold mr-4">2</div>
                        <img src="https://picsum.photos/id/1074/60/60" alt="《丑八怪》专辑封面" class="w-12 h-12 object-cover rounded mr-4" loading="lazy">
                        <div class="flex-grow">
                            <h4 class="font-medium">丑八怪</h4>
                            <p class="text-light/60 text-sm">播放量: 109,876,543</p>
                        </div>
                        <button class="play-btn text-primary hover:bg-primary hover:text-white w-8 h-8 rounded-full flex items-center justify-center transition-colors" data-song="丑八怪" data-duration="4:13" data-album="意外" data-cover="https://picsum.photos/id/1074/200/200">
                            <i class="fa fa-play"></i>
                        </button>
                    </div>

                    <!-- 排名3 -->
                    <div class="flex items-center p-3 bg-dark/40 rounded-lg">
                        <div class="w-8 h-8 bg-primary/60 rounded-full flex items-center justify-center font-bold mr-4">3</div>
                        <img src="https://picsum.photos/id/1083/60/60" alt="《认真的雪》专辑封面" class="w-12 h-12 object-cover rounded mr-4" loading="lazy">
                        <div class="flex-grow">
                            <h4 class="font-medium">认真的雪</h4>
                            <p class="text-light/60 text-sm">播放量: 98,765,432</p>
                        </div>
                        <button class="play-btn text-primary hover:bg-primary hover:text-white w-8 h-8 rounded-full flex items-center justify-center transition-colors" data-song="认真的雪" data-duration="4:19" data-album="薛之谦" data-cover="https://picsum.photos/id/1083/200/200">
                            <i class="fa fa-play"></i>
                        </button>
                    </div>

                    <!-- 排名4 -->
                    <div class="flex items-center p-3 bg-dark/40 rounded-lg">
                        <div class="w-8 h-8 bg-gray-600 rounded-full flex items-center justify-center font-bold mr-4">4</div>
                        <img src="https://picsum.photos/id/1062/60/60" alt="《刚刚好》专辑封面" class="w-12 h-12 object-cover rounded mr-4" loading="lazy">
                        <div class="flex-grow">
                            <h4 class="font-medium">刚刚好</h4>
                            <p class="text-light/60 text-sm">播放量: 87,654,321</p>
                        </div>
                        <button class="play-btn text-primary hover:bg-primary hover:text-white w-8 h-8 rounded-full flex items-center justify-center transition-colors" data-song="刚刚好" data-duration="3:58" data-album="初学者" data-cover="https://picsum.photos/id/1062/200/200">
                            <i class="fa fa-play"></i>
                        </button>
                    </div>

                    <!-- 排名5 -->
                    <div class="flex items-center p-3 bg-dark/40 rounded-lg">
                        <div class="w-8 h-8 bg-gray-600 rounded-full flex items-center justify-center font-bold mr-4">5</div>
                        <img src="https://picsum.photos/id/1059/60/60" alt="《暧昧》专辑封面" class="w-12 h-12 object-cover rounded mr-4" loading="lazy">
                        <div class="flex-grow">
                            <h4 class="font-medium">暧昧</h4>
                            <p class="text-light/60 text-sm">播放量: 76,543,210</p>
                        </div>
                        <button class="play-btn text-primary hover:bg-primary hover:text-white w-8 h-8 rounded-full flex items-center justify-center transition-colors" data-song="暧昧" data-duration="4:18" data-album="渡" data-cover="https://picsum.photos/id/1059/200/200">
                            <i class="fa fa-play"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 数据统计图表 -->
            <div class="bg-secondary/30 rounded-xl p-6">
                <h3 class="font-bold text-xl mb-6">歌曲播放趋势</h3>
                <div class="h-64">
                    <canvas id="playTrendsChart"></canvas>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- MV区域 -->
<section id="videos" class="py-20 bg-dark">
    <div class="container mx-auto px-4 md:px-6">
        <div class="flex justify-between items-end mb-12">
            <div>
                <h2 class="font-display font-bold text-[clamp(1.5rem,3vw,2.5rem)] mb-2">精选MV</h2>
                <p class="text-light/70 max-w-2xl">薛之谦音乐故事的视觉呈现，每一部MV都是艺术品</p>
            </div>
            <a href="#" class="hidden md:flex items-center text-primary hover:text-primary/80 transition-colors">
                查看全部 <i class="fa fa-arrow-right ml-2"></i>
            </a>
        </div>

        <!-- MV列表 -->
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
            <!-- MV1 -->
            <div class="video-card rounded-xl overflow-hidden bg-secondary/30 card-hover">
                <div class="relative">
                    <img src="https://picsum.photos/id/1025/600/400" alt="《演员》MV封面" class="w-full h-48 object-cover" loading="lazy">
                    <div class="video-overlay absolute inset-0 bg-primary/50 flex items-center justify-center">
                        <button class="w-16 h-16 bg-white rounded-full flex items-center justify-center text-primary hover:bg-primary hover:text-white transition-colors" data-video="演员">
                            <i class="fa fa-play text-2xl"></i>
                        </button>
                    </div>
                    <span class="absolute bottom-3 right-3 bg-dark/70 text-white text-xs px-2 py-1 rounded">4:21</span>
                </div>
                <div class="p-4">
                    <h3 class="font-bold text-lg mb-1">演员 - MV</h3>
                    <p class="text-light/70 text-sm mb-3">发布于 2015-06-08</p>
                    <div class="flex items-center text-light/60 text-sm">
                        <span class="flex items-center mr-4"><i class="fa fa-eye mr-1"></i> 12,345,678</span>
                        <span class="flex items-center"><i class="fa fa-heart mr-1"></i> 456,789</span>
                    </div>
                </div>
            </div>

            <!-- MV2 -->
            <div class="video-card rounded-xl overflow-hidden bg-secondary/30 card-hover">
                <div class="relative">
                    <img src="https://picsum.photos/id/1074/600/400" alt="《丑八怪》MV封面" class="w-full h-48 object-cover" loading="lazy">
                    <div class="video-overlay absolute inset-0 bg-primary/50 flex items-center justify-center">
                        <button class="w-16 h-16 bg-white rounded-full flex items-center justify-center text-primary hover:bg-primary hover:text-white transition-colors" data-video="丑八怪">
                            <i class="fa fa-play text-2xl"></i>
                        </button>
                    </div>
                    <span class="absolute bottom-3 right-3 bg-dark/70 text-white text-xs px-2 py-1 rounded">4:13</span>
                </div>
                <div class="p-4">
                    <h3 class="font-bold text-lg mb-1">丑八怪 - MV</h3>
                    <p class="text-light/70 text-sm mb-3">发布于 2013-10-17</p>
                    <div class="flex items-center text-light/60 text-sm">
                        <span class="flex items-center mr-4"><i class="fa fa-eye mr-1"></i> 10,987,654</span>
                        <span class="flex items-center"><i class="fa fa-heart mr-1"></i> 345,678</span>
                    </div>
                </div>
            </div>

            <!-- MV3 -->
            <div class="video-card rounded-xl overflow-hidden bg-secondary/30 card-hover">
                <div class="relative">
                    <img src="https://picsum.photos/id/1083/600/400" alt="《认真的雪》MV封面" class="w-full h-48 object-cover" loading="lazy">
                    <div class="video-overlay absolute inset-0 bg-primary/50 flex items-center justify-center">
                        <button class="w-16 h-16 bg-white rounded-full flex items-center justify-center text-primary hover:bg-primary hover:text-white transition-colors" data-video="认真的雪">
                            <i class="fa fa-play text-2xl"></i>
                        </button>
                    </div>
                    <span class="absolute bottom-3 right-3 bg-dark/70 text-white text-xs px-2 py-1 rounded">4:19</span>
                </div>
                <div class="p-4">
                    <h3 class="font-bold text-lg mb-1">认真的雪 - MV</h3>
                    <p class="text-light/70 text-sm mb-3">发布于 2006-06-09</p>
                    <div class="flex items-center text-light/60 text-sm">
                        <span class="flex items-center mr-4"><i class="fa fa-eye mr-1"></i> 9,876,543</span>
                        <span class="flex items-center"><i class="fa fa-heart mr-1"></i> 234,567</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- 移动端查看全部按钮 -->
        <div class="mt-8 text-center md:hidden">
            <a href="#" class="inline-flex items-center text-primary hover:text-primary/80 transition-colors">
                查看全部 <i class="fa fa-arrow-right ml-2"></i>
            </a>
        </div>
    </div>
</section>

<!-- 关于薛之谦 -->
<section id="about" class="py-20 bg-gradient-to-b from-dark to-secondary/20">
    <div class="container mx-auto px-4 md:px-6">
        <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
            <div>
                <h2 class="font-display font-bold text-[clamp(1.5rem,3vw,2.5rem)] mb-6">关于薛之谦</h2>
                <div class="space-y-4 text-light/90">
                    <p>薛之谦（Joker Xue），1983年7月17日出生于上海，中国内地男歌手、音乐制作人、演员、商人。</p>
                    <p>2005年，因参加选秀节目《我型我秀》而正式出道。2006年，发行首张同名专辑《薛之谦》，随后凭借歌曲《认真的雪》获得广泛关注。</p>
                    <p>他的音乐作品风格独特，歌词细腻深情，旋律朗朗上口，深受广大听众喜爱。代表作有《演员》《丑八怪》《刚刚好》《暧昧》等。</p>
                    <p>除了音乐事业，薛之谦还活跃在综艺节目中，以其幽默风趣的表现赢得观众喜爱。同时，他还创立了自己的服装品牌和火锅店，展现了多元化的发展。</p>
                </div>

                <div class="mt-8 flex space-x-4">
                    <a href="#" class="bg-primary hover:bg-primary/90 text-white font-medium py-2 px-6 rounded-full transition-all duration-300 flex items-center">
                        <i class="fa fa-info-circle mr-2"></i> 更多资料
                    </a>
                    <a href="#" class="bg-transparent border border-light hover:border-primary hover:text-primary text-white font-medium py-2 px-6 rounded-full transition-all duration-300 flex items-center">
                        <i class="fa fa-calendar mr-2"></i> 演唱会行程
                    </a>
                </div>

                <!-- 社交媒体链接 -->
                <div class="mt-8">
                    <h3 class="font-bold text-lg mb-4">关注薛之谦</h3>
                    <div class="flex space-x-4">
                        <a href="#" class="w-10 h-10 rounded-full bg-[#1DA1F2]/20 flex items-center justify-center text-[#1DA1F2] hover:bg-[#1DA1F2] hover:text-white transition-colors">
                            <i class="fa fa-twitter"></i>
                        </a>
                        <a href="#" class="w-10 h-10 rounded-full bg-[#E60023]/20 flex items-center justify-center text-[#E60023] hover:bg-[#E60023] hover:text-white transition-colors">
                            <i class="fa fa-instagram"></i>
                        </a>
                        <a href="#" class="w-10 h-10 rounded-full bg-[#FF0000]/20 flex items-center justify-center text-[#FF0000] hover:bg-[#FF0000] hover:text-white transition-colors">
                            <i class="fa fa-youtube-play"></i>
                        </a>
                        <a href="#" class="w-10 h-10 rounded-full bg-[#1877F2]/20 flex items-center justify-center text-[#1877F2] hover:bg-[#1877F2] hover:text-white transition-colors">
                            <i class="fa fa-facebook"></i>
                        </a>
                    </div>
                </div>
            </div>

            <div class="relative">
                <img src="https://picsum.photos/id/1076/800/1000" alt="薛之谦写真" class="w-full h-auto rounded-xl shadow-2xl" loading="lazy">
                <div class="absolute -bottom-6 -left-6 bg-primary p-4 rounded-lg shadow-lg max-w-xs">
                    <p class="font-bold text-lg mb-1">"音乐是我的信仰，我会一直做下去。"</p>
                    <p class="text-light/80 text-sm">— 薛之谦</p>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- 最新动态 -->
<section id="news" class="py-20 bg-dark">
    <div class="container mx-auto px-4 md:px-6">
        <div class="flex justify-between items-end mb-12">
            <div>
                <h2 class="font-display font-bold text-[clamp(1.5rem,3vw,2.5rem)] mb-2">最新动态</h2>
                <p class="text-light/70 max-w-2xl">薛之谦的最新消息、活动和音乐动态</p>
            </div>
            <a href="#" class="hidden md:flex items-center text-primary hover:text-primary/80 transition-colors">
                更多动态 <i class="fa fa-arrow-right ml-2"></i>
            </a>
        </div>

        <!-- 动态列表 -->
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
            <!-- 动态1 -->
            <div class="bg-secondary/30 rounded-xl overflow-hidden card-hover">
                <img src="https://picsum.photos/id/1035/600/400" alt="薛之谦新专辑发布" class="w-full h-48 object-cover" loading="lazy">
                <div class="p-5">
                    <div class="flex items-center text-light/60 text-sm mb-3">
                        <span class="flex items-center"><i class="fa fa-calendar mr-1"></i> 2023-05-15</span>
                        <span class="mx-2">•</span>
                        <span class="flex items-center"><i class="fa fa-tag mr-1"></i> 新专辑</span>
                    </div>
                    <h3 class="font-bold text-xl mb-2">薛之谦全新专辑《天外来物》正式发布</h3>
                    <p class="text-light/70 mb-4 line-clamp-3">薛之谦2023年全新创作专辑《天外来物》正式上线，包含10首全新歌曲，展现了他在音乐上的新探索...</p>
                    <a href="#" class="text-primary hover:text-primary/80 transition-colors flex items-center">
                        阅读详情 <i class="fa fa-long-arrow-right ml-2"></i>
                    </a>
                </div>
            </div>

            <!-- 动态2 -->
            <div class="bg-secondary/30 rounded-xl overflow-hidden card-hover">
                <img src="https://picsum.photos/id/1060/600/400" alt="薛之谦演唱会" class="w-full h-48 object-cover" loading="lazy">
                <div class="p-5">
                    <div class="flex items-center text-light/60 text-sm mb-3">
                        <span class="flex items-center"><i class="fa fa-calendar mr-1"></i> 2023-04-28</span>
                        <span class="mx-2">•</span>
                        <span class="flex items-center"><i class="fa fa-tag mr-1"></i> 演唱会</span>
                    </div>
                    <h3 class="font-bold text-xl mb-2">「天外来物」世界巡回演唱会新增5个城市</h3>
                    <p class="text-light/70 mb-4 line-clamp-3">薛之谦「天外来物」世界巡回演唱会宣布新增5个城市，包括成都、武汉、南京等，门票将于5月10日正式开启预售...</p>
                    <a href="#" class="text-primary hover:text-primary/80 transition-colors flex items-center">
                        阅读详情 <i class="fa fa-long-arrow-right ml-2"></i>
                    </a>
                </div>
            </div>

            <!-- 动态3 -->
            <div class="bg-secondary/30 rounded-xl overflow-hidden card-hover">
                <img src="https://picsum.photos/id/1066/600/400" alt="薛之谦公益活动" class="w-full h-48 object-cover" loading="lazy">
                <div class="p-5">
                    <div class="flex items-center text-light/60 text-sm mb-3">
                        <span class="flex items-center"><i class="fa fa-calendar mr-1"></i> 2023-04-10</span>
                        <span class="mx-2">•</span>
                        <span class="flex items-center"><i class="fa fa-tag mr-1"></i> 公益</span>
                    </div>
                    <h3 class="font-bold text-xl mb-2">薛之谦参与公益活动，为山区儿童捐赠音乐教室</h3>
                    <p class="text-light/70 mb-4 line-clamp-3">薛之谦近日参与"音乐点亮未来"公益项目，为偏远山区学校捐赠音乐教室和乐器，并承诺将定期前往支教...</p>
                    <a href="#" class="text-primary hover:text-primary/80 transition-colors flex items-center">
                        阅读详情 <i class="fa fa-long-arrow-right ml-2"></i>
                    </a>
                </div>
            </div>
        </div>

        <!-- 移动端查看全部按钮 -->
        <div class="mt-8 text-center md:hidden">
            <a href="#" class="inline-flex items-center text-primary hover:text-primary/80 transition-colors">
                更多动态 <i class="fa fa-arrow-right ml-2"></i>
            </a>
        </div>
    </div>
</section>

<!-- 粉丝社区 -->
<section class="py-20 bg-gradient-to-b from-dark to-secondary/20">
    <div class="container mx-auto px-4 md:px-6">
        <div class="text-center mb-12">
            <h2 class="font-display font-bold text-[clamp(1.5rem,3vw,2.5rem)] mb-4">谦友社区</h2>
            <p class="text-light/70 max-w-2xl mx-auto">加入薛之谦粉丝社区，与其他谦友一起分享、交流和支持</p>
        </div>

        <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
            <!-- 社区功能1 -->
            <div class="bg-secondary/30 rounded-xl p-6 text-center card-hover">
                <div class="w-16 h-16 bg-primary/20 rounded-full flex items-center justify-center mx-auto mb-4">
                    <i class="fa fa-comments text-primary text-2xl"></i>
                </div>
                <h3 class="font-bold text-xl mb-2">粉丝交流</h3>
                <p class="text-light/70 mb-4">加入粉丝讨论区，与其他谦友分享对薛之谦音乐的理解和喜爱</p>
                <a href="#" class="text-primary hover:text-primary/80 transition-colors inline-flex items-center">
                    进入社区 <i class="fa fa-arrow-right ml-2"></i>
                </a>
            </div>

            <!-- 社区功能2 -->
            <div class="bg-secondary/30 rounded-xl p-6 text-center card-hover">
                <div class="w-16 h-16 bg-primary/20 rounded-full flex items-center justify-center mx-auto mb-4">
                    <i class="fa fa-camera text-primary text-2xl"></i>
                </div>
                <h3 class="font-bold text-xl mb-2">照片分享</h3>
                <p class="text-light/70 mb-4">分享演唱会、活动现场照片，记录与薛之谦相关的珍贵瞬间</p>
                <a href="#" class="text-primary hover:text-primary/80 transition-colors inline-flex items-center">
                    查看照片 <i class="fa fa-arrow-right ml-2"></i>
                </a>
            </div>

            <!-- 社区功能3 -->
            <div class="bg-secondary/30 rounded-xl p-6 text-center card-hover">
                <div class="w-16 h-16 bg-primary/20 rounded-full flex items-center justify-center mx-auto mb-4">
                    <i class="fa fa-trophy text-primary text-2xl"></i>
                </div>
                <h3 class="font-bold text-xl mb-2">粉丝活动</h3>
                <p class="text-light/70 mb-4">参与粉丝专属活动，赢取演唱会门票、签名周边等独家福利</p>
                <a href="#" class="text-primary hover:text-primary/80 transition-colors inline-flex items-center">
                    了解活动 <i class="fa fa-arrow-right ml-2"></i>
                </a>
            </div>
        </div>
    </div>
</section>

<!-- 订阅区域 -->
<section class="py-16 bg-primary/10">
    <div class="container mx-auto px-4 md:px-6">
        <div class="max-w-3xl mx-auto text-center">
            <h2 class="font-display font-bold text-[clamp(1.5rem,3vw,2.5rem)] mb-4">订阅最新消息</h2>
            <p class="text-light/70 mb-8">第一时间获取薛之谦的最新音乐、活动和独家内容</p>

            <form class="flex flex-col sm:flex-row gap-3 max-w-xl mx-auto">
                <input type="email" placeholder="输入您的邮箱地址" class="flex-grow px-4 py-3 rounded-full bg-secondary/50 border border-light/20 focus:outline-none focus:border-primary transition-colors">
                <button type="submit" class="bg-primary hover:bg-primary/90 text-white font-medium py-3 px-6 rounded-full transition-all duration-300 whitespace-nowrap">
                    立即订阅
                </button>
            </form>

            <p class="text-light/50 text-sm mt-4">我们尊重您的隐私，不会向第三方分享您的信息</p>
        </div>
    </div>
</section>

<!-- 页脚 -->
<footer class="bg-dark pt-16 pb-8 border-t border-light/10">
    <div class="container mx-auto px-4 md:px-6">
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12">
            <!-- 关于平台 -->
            <div>
                <div class="flex items-center space-x-2 mb-6">
                    <div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center">
                        <span class="font-display font-bold text-xl">薛</span>
                    </div>
                    <span class="font-display font-bold text-xl">薛之谦音乐平台</span>
                </div>
                <p class="text-light/70 mb-6">专注于提供薛之谦的音乐作品、最新动态和粉丝互动的官方平台</p>
                <div class="flex space-x-4">
                    <a href="#" class="text-light/60 hover:text-primary transition-colors">
                        <i class="fa fa-weibo"></i>
                    </a>
                    <a href="#" class="text-light/60 hover:text-primary transition-colors">
                        <i class="fa fa-wechat"></i>
                    </a>
                    <a href="#" class="text-light/60 hover:text-primary transition-colors">
                        <i class="fa fa-instagram"></i>
                    </a>
                    <a href="#" class="text-light/60 hover:text-primary transition-colors">
                        <i class="fa fa-youtube-play"></i>
                    </a>
                </div>
            </div>

            <!-- 快速链接 -->
            <div>
                <h3 class="font-bold text-lg mb-6">快速链接</h3>
                <ul class="space-y-3">
                    <li><a href="#home" class="text-light/70 hover:text-primary transition-colors">首页</a></li>
                    <li><a href="#songs" class="text-light/70 hover:text-primary transition-colors">歌曲</a></li>
                    <li><a href="#videos" class="text-light/70 hover:text-primary transition-colors">MV</a></li>
                    <li><a href="#about" class="text-light/70 hover:text-primary transition-colors">关于</a></li>
                    <li><a href="#news" class="text-light/70 hover:text-primary transition-colors">动态</a></li>
                </ul>
            </div>

            <!-- 相关资源 -->
            <div>
                <h3 class="font-bold text-lg mb-6">相关资源</h3>
                <ul class="space-y-3">
                    <li><a href="#" class="text-light/70 hover:text-primary transition-colors">官方网站</a></li>
                    <li><a href="#" class="text-light/70 hover:text-primary transition-colors">演唱会门票</a></li>
                    <li><a href="#" class="text-light/70 hover:text-primary transition-colors">周边商城</a></li>
                    <li><a href="#" class="text-light/70 hover:text-primary transition-colors">粉丝社区</a></li>
                    <li><a href="#" class="text-light/70 hover:text-primary transition-colors">合作联系</a></li>
                </ul>
            </div>

            <!-- 联系信息 -->
            <div>
                <h3 class="font-bold text-lg mb-6">联系我们</h3>
                <ul class="space-y-3">
                    <li class="flex items-start">
                        <i class="fa fa-envelope text-primary mt-1 mr-3"></i>
                        <span class="text-light/70">contact@xuezhiqian.com</span>
                    </li>
                    <li class="flex items-start">
                        <i class="fa fa-phone text-primary mt-1 mr-3"></i>
                        <span class="text-light/70">+86 123 4567 8910</span>
                    </li>
                    <li class="flex items-start">
                        <i class="fa fa-map-marker text-primary mt-1 mr-3"></i>
                        <span class="text-light/70">上海市静安区南京西路1266号</span>
                    </li>
                </ul>
            </div>
        </div>

        <!-- 版权信息 -->
        <div class="pt-8 border-t border-light/10 text-center text-light/50 text-sm">
            <p>© 2023 薛之谦音乐平台 版权所有 | 沪ICP备12345678号</p>
        </div>
    </div>
</footer>

<!-- 音频元素 - 用于音乐播放 -->
<audio id="audio-player" preload="none">
    <source id="audio-source" src="" type="audio/mpeg">
    您的浏览器不支持音频播放功能
</audio>

<!-- 音乐播放器（固定在底部） -->
<div id="music-player" class="fixed bottom-0 left-0 right-0 bg-dark/90 backdrop-blur border-t border-light/10 z-40 transform translate-y-full transition-transform duration-300">
    <div class="container mx-auto px-4 py-3">
        <div class="flex flex-col md:flex-row items-center">
            <!-- 当前播放信息 -->
            <div class="flex items-center w-full md:w-1/4 mb-3 md:mb-0">
                <img id="player-cover" src="https://picsum.photos/id/1025/60/60" alt="当前播放歌曲封面" class="w-12 h-12 object-cover rounded mr-3">
                <div class="flex-grow">
                    <h4 id="player-title" class="font-medium text-sm truncate">演员</h4>
                    <p id="player-album" class="text-light/60 text-xs">《初学者》</p>
                </div>
                <button class="ml-2 text-light/60 hover:text-primary transition-colors like-btn">
                    <i class="fa fa-heart-o"></i>
                </button>
            </div>

            <!-- 播放控制 -->
            <div class="w-full md:w-2/4 flex flex-col items-center">
                <div class="flex items-center space-x-4 md:space-x-6 mb-2">
                    <button class="text-light/60 hover:text-primary transition-colors shuffle-btn">
                        <i class="fa fa-random"></i>
                    </button>
                    <button class="text-light/60 hover:text-primary transition-colors prev-btn">
                        <i class="fa fa-step-backward"></i>
                    </button>
                    <button id="play-pause-btn" class="w-10 h-10 bg-primary rounded-full flex items-center justify-center text-white hover:bg-primary/90 transition-colors">
                        <i class="fa fa-play"></i>
                    </button>
                    <button class="text-light/60 hover:text-primary transition-colors next-btn">
                        <i class="fa fa-step-forward"></i>
                    </button>
                    <button class="text-light/60 hover:text-primary transition-colors repeat-btn">
                        <i class="fa fa-repeat"></i>
                    </button>
                </div>

                <!-- 进度条 -->
                <div class="w-full flex items-center space-x-2">
                    <span id="current-time" class="text-light/60 text-xs">0:00</span>
                    <div class="progress-container flex-grow" id="progress-container">
                        <div class="progress-bar" id="progress-bar"></div>
                    </div>
                    <span id="total-time" class="text-light/60 text-xs">4:21</span>
                </div>
            </div>

            <!-- 音量控制 -->
            <div class="w-full md:w-1/4 flex items-center justify-end mt-3 md:mt-0">
                <button class="text-light/60 hover:text-primary transition-colors mr-2 playlist-btn">
                    <i class="fa fa-list"></i>
                </button>
                <div class="hidden md:block w-24 mr-2">
                    <div class="progress-container volume-container">
                        <div class="progress-bar" id="volume-bar" style="width: 70%;"></div>
                    </div>
                </div>
                <button class="text-light/60 hover:text-primary transition-colors volume-btn">
                    <i class="fa fa-volume-up"></i>
                </button>
            </div>
        </div>
    </div>
</div>

<!-- 视频播放器模态框 -->
<div id="video-modal" class="fixed inset-0 bg-black/80 z-50 hidden flex items-center justify-center p-4">
    <div class="relative w-full max-w-4xl">
        <button id="close-video" class="absolute -top-12 right-0 text-white hover:text-primary transition-colors">
            <i class="fa fa-times text-2xl"></i>
        </button>
        <div class="aspect-video bg-dark rounded-lg overflow-hidden">
            <iframe id="video-player" width="100%" height="100%" src="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
        </div>
    </div>
</div>

<script>
    // 页面加载完成后执行
    document.addEventListener('DOMContentLoaded', function() {
        // 隐藏加载指示器
        setTimeout(function() {
            const loader = document.getElementById('loader');
            loader.classList.add('fade-out');

            // 显示页面内容
            setTimeout(function() {
                document.body.classList.add('loaded');
            }, 500);
        }, 800);

        // 导航栏滚动效果
        const navbar = document.getElementById('navbar');
        window.addEventListener('scroll', () => {
            if (window.scrollY > 50) {
                navbar.classList.add('nav-scrolled');
            } else {
                navbar.classList.remove('nav-scrolled');
            }
        });

        // 移动端菜单切换
        const menuToggle = document.getElementById('menu-toggle');
        const mobileMenu = document.getElementById('mobile-menu');
        menuToggle.addEventListener('click', () => {
            mobileMenu.classList.toggle('hidden');
        });

        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();

                // 关闭移动菜单（如果打开）
                mobileMenu.classList.add('hidden');

                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });

        // 音乐播放功能实现
        const audioPlayer = document.getElementById('audio-player');
        const audioSource = document.getElementById('audio-source');
        const playButtons = document.querySelectorAll('.play-btn');
        const playPauseBtn = document.getElementById('play-pause-btn');
        const progressBar = document.getElementById('progress-bar');
        const progressContainer = document.getElementById('progress-container');
        const currentTimeEl = document.getElementById('current-time');
        const totalTimeEl = document.getElementById('total-time');
        const playerTitle = document.getElementById('player-title');
        const playerAlbum = document.getElementById('player-album');
        const playerCover = document.getElementById('player-cover');
        const musicPlayer = document.getElementById('music-player');
        const volumeBar = document.getElementById('volume-bar');
        const volumeContainer = document.querySelector('.volume-container');
        const volumeBtn = document.querySelector('.volume-btn');
        const prevBtn = document.querySelector('.prev-btn');
        const nextBtn = document.querySelector('.next-btn');
        const shuffleBtn = document.querySelector('.shuffle-btn');
        const repeatBtn = document.querySelector('.repeat-btn');
        const likeBtn = document.querySelector('.like-btn');

        // 存储所有歌曲信息
        let allSongs = [];
        let currentSongIndex = 0;
        let isShuffle = false;
        let repeatMode = 0; // 0: 不重复, 1: 单曲重复, 2: 列表重复
        let isLiked = false;

        // 收集所有歌曲信息
        playButtons.forEach((btn, index) => {
            allSongs.push({
                id: index,
                title: btn.getAttribute('data-song'),
                duration: btn.getAttribute('data-duration'),
                album: btn.getAttribute('data-album'),
                cover: btn.getAttribute('data-cover'),
                // 在实际应用中，这里应该是真实的音频文件URL
                // 这里使用示例音频URL，实际使用时请替换为真实的音频源
                url: `https://example.com/music/${encodeURIComponent(btn.getAttribute('data-song'))}.mp3`
            });
        });

        // 格式化时间（秒 -> mm:ss）
        function formatTime(seconds) {
            const minutes = Math.floor(seconds / 60);
            seconds = Math.floor(seconds % 60);
            return `${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
        }

        // 更新播放进度
        function updateProgress() {
            if (isNaN(audioPlayer.duration)) return;

            const percent = (audioPlayer.currentTime / audioPlayer.duration) * 100;
            progressBar.style.width = `${percent}%`;
            currentTimeEl.textContent = formatTime(audioPlayer.currentTime);
        }

        // 更新播放器UI
        function updatePlayerUI(song) {
            playerTitle.textContent = song.title;
            playerAlbum.textContent = `《${song.album}》`;
            playerCover.src = song.cover;
            totalTimeEl.textContent = song.duration;

            // 重置所有播放按钮状态
            playButtons.forEach(btn => {
                btn.classList.remove('play-btn-playing');
                btn.innerHTML = '<i class="fa fa-play text-2xl"></i>';
            });

            // 设置当前播放按钮状态
            playButtons.forEach(btn => {
                if (btn.getAttribute('data-song') === song.title) {
                    btn.classList.add('play-btn-playing');
                    btn.innerHTML = '<i class="fa fa-pause text-2xl"></i>';
                }
            });

            // 更新播放/暂停按钮图标
            playPauseBtn.innerHTML = '<i class="fa fa-pause"></i>';
        }

        // 播放指定歌曲
        function playSong(song) {
            // 找到歌曲索引
            currentSongIndex = allSongs.findIndex(s => s.title === song.title);

            // 更新音频源并播放
            audioSource.src = song.url;
            audioPlayer.load();
            audioPlayer.play().catch(error => {
                console.error('播放失败:', error);
                alert('播放失败，请检查音频文件是否可用');
            });

            // 显示播放器
            musicPlayer.classList.remove('translate-y-full');

            // 更新UI
            updatePlayerUI(song);
        }

        // 播放/暂停切换
        function togglePlayPause() {
            if (audioPlayer.paused) {
                audioPlayer.play();
                playPauseBtn.innerHTML = '<i class="fa fa-pause"></i>';

                // 更新当前播放按钮状态
                playButtons.forEach(btn => {
                    if (btn.getAttribute('data-song') === allSongs[currentSongIndex].title) {
                        btn.classList.add('play-btn-playing');
                        btn.innerHTML = '<i class="fa fa-pause text-2xl"></i>';
                    }
                });
            } else {
                audioPlayer.pause();
                playPauseBtn.innerHTML = '<i class="fa fa-play"></i>';

                // 更新当前播放按钮状态
                playButtons.forEach(btn => {
                    if (btn.getAttribute('data-song') === allSongs[currentSongIndex].title) {
                        btn.classList.remove('play-btn-playing');
                        btn.innerHTML = '<i class="fa fa-play text-2xl"></i>';
                    }
                });
            }
        }

        // 播放下一首
        function playNextSong() {
            if (allSongs.length === 0) return;

            if (isShuffle) {
                // 随机播放
                let randomIndex;
                do {
                    randomIndex = Math.floor(Math.random() * allSongs.length);
                } while (randomIndex === currentSongIndex && allSongs.length > 1);
                currentSongIndex = randomIndex;
            } else {
                // 顺序播放
                currentSongIndex = (currentSongIndex + 1) % allSongs.length;
            }

            playSong(allSongs[currentSongIndex]);
        }

        // 播放上一首
        function playPrevSong() {
            if (allSongs.length === 0) return;

            if (isShuffle) {
                // 随机播放
                let randomIndex;
                do {
                    randomIndex = Math.floor(Math.random() * allSongs.length);
                } while (randomIndex === currentSongIndex && allSongs.length > 1);
                currentSongIndex = randomIndex;
            } else {
                // 顺序播放
                currentSongIndex = (currentSongIndex - 1 + allSongs.length) % allSongs.length;
            }

            playSong(allSongs[currentSongIndex]);
        }

        // 切换随机播放
        function toggleShuffle() {
            isShuffle = !isShuffle;
            shuffleBtn.style.color = isShuffle ? '#E63946' : '';
        }

        // 切换重复模式
        function toggleRepeat() {
            repeatMode = (repeatMode + 1) % 3;

            // 更新按钮样式
            switch(repeatMode) {
                case 0: // 不重复
                    repeatBtn.style.color = '';
                    repeatBtn.innerHTML = '<i class="fa fa-repeat"></i>';
                    break;
                case 1: // 单曲重复
                    repeatBtn.style.color = '#E63946';
                    repeatBtn.innerHTML = '<i class="fa fa-repeat"></i>';
                    break;
                case 2: // 列表重复
                    repeatBtn.style.color = '#E63946';
                    repeatBtn.innerHTML = '<i class="fa fa-repeat fa-rotate-180"></i>';
                    break;
            }
        }

        // 切换喜欢状态
        function toggleLike() {
            isLiked = !isLiked;
            likeBtn.innerHTML = isLiked ? '<i class="fa fa-heart"></i>' : '<i class="fa fa-heart-o"></i>';
            likeBtn.style.color = isLiked ? '#E63946' : '';
        }

        // 调整音量
        function setVolume(percent) {
            audioPlayer.volume = percent / 100;
            volumeBar.style.width = `${percent}%`;

            // 更新音量图标
            if (percent === 0) {
                volumeBtn.innerHTML = '<i class="fa fa-volume-off"></i>';
            } else if (percent < 50) {
                volumeBtn.innerHTML = '<i class="fa fa-volume-down"></i>';
            } else {
                volumeBtn.innerHTML = '<i class="fa fa-volume-up"></i>';
            }
        }

        // 切换静音
        function toggleMute() {
            audioPlayer.muted = !audioPlayer.muted;

            if (audioPlayer.muted) {
                volumeBtn.innerHTML = '<i class="fa fa-volume-off"></i>';
            } else {
                setVolume(audioPlayer.volume * 100);
            }
        }

        // 事件监听 - 播放按钮点击
        playButtons.forEach(button => {
            button.addEventListener('click', function() {
                const songTitle = this.getAttribute('data-song');
                const song = allSongs.find(s => s.title === songTitle);

                if (song) {
                    // 如果点击的是当前播放的歌曲，则切换播放/暂停状态
                    if (audioPlayer.src.includes(songTitle) && !audioPlayer.paused) {
                        togglePlayPause();
                    } else {
                        // 否则播放新歌曲
                        playSong(song);
                    }
                }
            });
        });

        // 事件监听 - 播放/暂停按钮点击
        playPauseBtn.addEventListener('click', togglePlayPause);

        // 事件监听 - 进度更新
        audioPlayer.addEventListener('timeupdate', updateProgress);

        // 事件监听 - 点击进度条调整播放位置
        progressContainer.addEventListener('click', function(e) {
            const width = this.clientWidth;
            const clickX = e.offsetX;
            const duration = audioPlayer.duration;
            audioPlayer.currentTime = (clickX / width) * duration;
        });

        // 事件监听 - 歌曲播放结束
        audioPlayer.addEventListener('ended', function() {
            if (repeatMode === 1) {
                // 单曲重复
                audioPlayer.currentTime = 0;
                audioPlayer.play();
            } else {
                // 播放下一首或停止
                if (repeatMode === 2 || currentSongIndex < allSongs.length - 1 || isShuffle) {
                    playNextSong();
                } else {
                    // 列表播放结束
                    playPauseBtn.innerHTML = '<i class="fa fa-play"></i>';
                    progressBar.style.width = '0%';
                    currentTimeEl.textContent = '0:00';
                }
            }
        });

        // 事件监听 - 音量控制
        volumeContainer.addEventListener('click', function(e) {
            const width = this.clientWidth;
            const clickX = e.offsetX;
            const volume = (clickX / width) * 100;
            setVolume(volume);
        });

        // 事件监听 - 音量按钮点击
        volumeBtn.addEventListener('click', toggleMute);

        // 事件监听 - 上一首/下一首按钮
        prevBtn.addEventListener('click', playPrevSong);
        nextBtn.addEventListener('click', playNextSong);

        // 事件监听 - 随机播放按钮
        shuffleBtn.addEventListener('click', toggleShuffle);

        // 事件监听 - 重复播放按钮
        repeatBtn.addEventListener('click', toggleRepeat);

        // 事件监听 - 喜欢按钮
        likeBtn.addEventListener('click', toggleLike);

        // 视频播放功能
        const videoButtons = document.querySelectorAll('[data-video]');
        const videoModal = document.getElementById('video-modal');
        const videoPlayer = document.getElementById('video-player');
        const closeVideo = document.getElementById('close-video');

        // 视频源映射（实际应用中替换为真实视频URL）
        const videoSources = {
            '演员': 'https://www.youtube.com/embed/dQw4w9WgXcQ',
            '丑八怪': 'https://www.youtube.com/embed/dQw4w9WgXcQ',
            '认真的雪': 'https://www.youtube.com/embed/dQw4w9WgXcQ'
        };

        // 打开视频播放
        videoButtons.forEach(button => {
            button.addEventListener('click', function() {
                const video = this.getAttribute('data-video');
                if (videoSources[video]) {
                    videoPlayer.src = videoSources[video];
                    videoModal.classList.remove('hidden');
                    document.body.style.overflow = 'hidden'; // 禁止背景滚动

                    // 暂停音乐播放
                    if (!audioPlayer.paused) {
                        togglePlayPause();
                    }
                }
            });
        });

        // 关闭视频播放
        closeVideo.addEventListener('click', function() {
            videoModal.classList.add('hidden');
            videoPlayer.src = ''; // 停止视频播放
            document.body.style.overflow = ''; // 恢复背景滚动
        });

        // 点击模态框外部关闭视频
        videoModal.addEventListener('click', function(e) {
            if (e.target === videoModal) {
                closeVideo.click();
            }
        });

        // 初始化播放趋势图表
        const ctx = document.getElementById('playTrendsChart').getContext('2d');
        const playTrendsChart = new Chart(ctx, {
            type: 'line',
            data: {
                labels: ['1月', '2月', '3月', '4月', '5月', '6月'],
                datasets: [
                    {
                        label: '演员',
                        data: [650000, 720000, 810000, 780000, 920000, 1050000],
                        borderColor: '#E63946',
                        backgroundColor: 'rgba(230, 57, 70, 0.1)',
                        tension: 0.4,
                        fill: true
                    },
                    {
                        label: '丑八怪',
                        data: [580000, 650000, 700000, 680000, 820000, 900000],
                        borderColor: '#457B9D',
                        backgroundColor: 'rgba(69, 123, 157, 0.1)',
                        tension: 0.4,
                        fill: true
                    },
                    {
                        label: '认真的雪',
                        data: [420000, 480000, 530000, 610000, 690000, 750000],
                        borderColor: '#1D3557',
                        backgroundColor: 'rgba(29, 53, 87, 0.1)',
                        tension: 0.4,
                        fill: true
                    }
                ]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                scales: {
                    y: {
                        beginAtZero: true,
                        grid: {
                            color: 'rgba(255, 255, 255, 0.1)'
                        },
                        ticks: {
                            color: 'rgba(255, 255, 255, 0.7)'
                        }
                    },
                    x: {
                        grid: {
                            color: 'rgba(255, 255, 255, 0.1)'
                        },
                        ticks: {
                            color: 'rgba(255, 255, 255, 0.7)'
                        }
                    }
                },
                plugins: {
                    legend: {
                        labels: {
                            color: 'rgba(255, 255, 255, 0.7)'
                        }
                    }
                }
            }
        });
    });
</script>
</body>
</html>
